<?php

/**
 * Description of Model_Parser
 *
 * @author pahhan
 */
abstract class Model_Parser
{
    protected $parse_result;

    public function clearParseResult()
    {
        $this->parse_result = null;
    }

    /**
     * @return boolean
     */
    abstract public function validateHtml($html, $id);

    /**
     * @return Model_Parser_ParserResult
     */
    abstract public function parseHtml($html);

    public function getNextUrl($html)
    {
        return FALSE;
    }

    public function getNextId($html)
    {
        return FALSE;
    }

    /**
     *
     * @param type $html
     * @return \Extension_Crawler
     */
    protected function getCrawler($html)
    {
        return new Extension_Crawler($html);
    }

    /**
     * @return integer
     */
    abstract public function getParseInfoId();

    /**
     * @return string
     */
    abstract public function getCharset();

}